package com.example.demo.fallback;

import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class ApiFeignFallbackFactory implements FallbackFactory<ApiFeignFallback> {
    @Override
    public ApiFeignFallback create(Throwable throwable) {
        log.error("enter apiFeignFallbackFactory");
        ApiFeignFallback apiFeignFallback = new ApiFeignFallback(throwable);
        return apiFeignFallback;
    }
}
